const mongoose = require("mongoose");
//获取订单统计数据
module.exports.getOrderStatistics3 = async () => {
	const total = await mongoose.model("orderformModel").countDocuments();
	const success = await mongoose
		.model("orderformModel")
		.countDocuments({ isSend: 0 });
	const warning = await mongoose
		.model("orderformModel")
		.countDocuments({ isSend: 1 });
	const canceled = await mongoose
		.model("orderformModel")
		.countDocuments({ isSend: 2 });
	const deleted = await mongoose
		.model("orderformModel")
		.countDocuments({ isSend: 3 });
	return { total: total - deleted, success, warning, canceled };
};
